#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.61)
AC_INIT(tsubamegaeshi-base/behavior.h)
AM_INIT_AUTOMAKE(tsubamegaeshi-base, 0.1.99)
AC_CONFIG_SRCDIR([tsubamegaeshi-base/behavior.h])
AC_CONFIG_HEADER([config.h])

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_RANLIB

# Checks for libraries.
AX_BOOST_BASE([1.33.0])
AX_BOOST_REGEX
AC_PATH_PROGS(OXYGEN_CFG,[oxygen-config],no)
if test $OXYGEN_CFG = "no"; then
	AC_ERROR([need rcssserver3d devel library to compile agentspark-lite])
else
	rcss_prefix=`$OXYGEN_CFG --prefix`
	rcss_cppflags=`$OXYGEN_CFG --cflags`
	CPPFLAGS="$CPPFLAGS $rcss_cppflags"
	RCSS3D_LDFLAGS="-L${rcss_prefix}/lib/rcssserver3d"
	AC_SUBST(RCSS3D_LDFLAGS)
fi

# Checks for header files.
AC_CHECK_HEADERS([netinet/in.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_HEADER_TIME

# Checks for library functions.
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([select strerror])

AC_CONFIG_FILES([
	Makefile
	tsubamegaeshi-base/Makefile
	contrib/Makefile
	contrib/naito/Makefile
	contrib/sample/Makefile
	src/Makefile
])
AC_OUTPUT
